package com.cty.ftp;

import com.cty.utils.FtpUtil;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

/**
 * @Auther: cty
 * @Date: 2020/4/4 23:03
 * @Description:
 * @version: 1.0
 */
public class TestFtpUtils {
    public static void main(String[] args) throws FileNotFoundException {
        InputStream is = new FileInputStream("E:/xiaer.png");
        boolean res = FtpUtil.uploadFile("192.168.238.128",21,"ftpuser","ftpuser","/home/ftpuser","/test/","32.png",is);
        if(res){
            System.out.println("上传成功");
        }else {
            System.out.println("上传失败");
        }
    }
}
